package FifthQuestion;

/**
 * @author cyt
 * @date 2020/6/14
 */
public class Card {

    private CardValue cardValue;

    private CardType cardType;

    public Card(CardValue cardValue, CardType cardType) {
        this.cardValue = cardValue;
        this.cardType = cardType;
    }

    public CardValue getCardValue() {
        return cardValue;
    }

    public void setCardValue(CardValue cardValue) {
        this.cardValue = cardValue;
    }

    public CardType getCardType() {
        return cardType;
    }

    @Override
    public String toString() {
        if(cardType != null){
            return cardValue.toString()+"("+cardType+")";
        }else {
            return cardValue.toString();
        }

    }

    public void setCardType(CardType cardType) {
        this.cardType = cardType;
    }
}
